# Generated by Django 3.1.2 on 2020-11-04 15:10

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Player',
            fields=[
                ('djangouser', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='auth.user')),
                ('alias', models.CharField(max_length=20)),
                ('startcapital', models.IntegerField()),
                ('capital', models.IntegerField()),
                ('acceptedloss', models.DecimalField(decimal_places=0, max_digits=2)),
            ],
        ),
        migrations.CreateModel(
            name='Stock',
            fields=[
                ('symbol', models.CharField(max_length=8, primary_key=True, serialize=False)),
                ('description', models.CharField(blank=True, max_length=20, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Transaction',
            fields=[
                ('transnr', models.IntegerField(primary_key=True, serialize=False)),
                ('buydate', models.DateTimeField(auto_now_add=True)),
                ('selldate', models.DateTimeField(blank=True, null=True)),
                ('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='zylinder_app.player')),
                ('symbol', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='zylinder_app.stock')),
            ],
        ),
    ]
